<template>
	<view>
		<om-button :buttons="buttons" @btnChange="btnChange"></om-button>
		<view class="cu-modal" :class="showModal ? 'show' : ''">
			<view class="cu-dialog">
				<view class="cu-bar bg-white justify-end">
					<view class="content" style="position: relative;">{{ modalTitle }}</view>
					<view class="action" @tap="hideModal"><text class="cuIcon-close text-red"></text></view>
				</view>
				<view class="bg-white" style="border-top: 1rpx solid #eee;border-bottom: 1rpx solid #eee;">
					<uni-list>
						<uni-list-item :showArrow="false" :showHover="false">
							<radio-group @change="radioChange">
								<view style="display: flex; flex-flow:row wrap">
									<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in checkRadio" :key="item.value">
										<view class="tui-flex" style="padding-right: 5px;padding-top: 5px;">
											<view><radio :value="item.value" :checked="index === radioIndex" /></view>
											<view>{{ item.text }}</view>
										</view>
									</label>
								</view>
							</radio-group>
						</uni-list-item>
						<uni-list-item v-if="showChangeNode && isApprove=='1'" :showHover="false" :showArrow="changeNode">
							<view class="tui-flex align-center">
								<view class="tui-flex tui-col-6">
									<om-label label="转办" :required="changeNodeRequired"></om-label>
									<switch @change="switchChangeNodeChange" :class="changeNode ? 'checked' : ''" :checked="changeNode ? true : false"></switch>
								</view>
								<view v-if="changeNode" class="tui-right tui-col-6" @click="linkChangeNodeUserFunc">{{ changeNodeUserNames || '请选择' }}</view>
							</view>
						</uni-list-item>
						<uni-list-item v-if="showChangeApprover && isApprove=='1'" :showHover="false" :showArrow="changeApprover">
							<view class="tui-flex align-center">
								<view class="tui-col-6">
									更换审批人
									<switch @change="switchApproverChange" :class="changeApprover ? 'checked' : ''" :checked="changeApprover ? true : false"></switch>
								</view>
								<view v-if="changeApprover" class="tui-right tui-col-6" @click="linkApproveUserFunc">{{ approveUserName || '请选择' }}</view>
							</view>
						</uni-list-item>
						<uni-list-item v-if="isApprove=='4'" :showHover="false" :showArrow="false">
							<view class="tui-left" style="text-align: left;">
								{{'驳回方式'}}
							</view>
							<view class="tui-flex align-center">
								<radio-group @change="backTypeRadioChange">
									<label class="uni-list-cell uni-list-cell-pd" style="boorder: 1px solid red; display: flex;margin-top: 5px;" v-for="(item, index) in backTypeList" :key="item.value">
										<view>
											<radio :value="item.value" :checked="index === current" />
										</view>
										<view>{{item.name}}</view>
									</label>
								</radio-group>
							</view>
						</uni-list-item>
						<uni-list-item v-if="isApprove=='4'" :showHover="false">
							<view class="tui-flex align-center">
								<view class="tui-col-6">
									驳回节点
								</view>
								<view class="tui-right tui-col-6" @click="linkBackFlowNodeFunc">
									{{backFlowNodeName||"请选择"}}
								</view>
							</view>
						</uni-list-item>
						<uni-list-item  :showArrow="false" :showHover="false">
							<view style="text-align: left;width: 100%;"><textarea  :placeholder-style="isApprove=='4' && noOpinion?'border:1px solid red':''"  :auto-height="true" class="om-textarea padding" v-model="opinion" :placeholder="isApprove=='4'&& noOpinion?'项为必输项':'意见说明……'" /></view>
						</uni-list-item>
						<uni-list-item  v-if="busCode == 'HRS0702'"  :showArrow="false" :showHover="false">
							<template slot="header">
								<view class="setting" @click="procecureClick">
									<image style="width: 17px;height: 17px;" src="/static/images/others/setting.png" mode=""></image>
									<view class="">
										{{'离职人员流程处理'}}
									</view>
								</view>
							</template>
						</uni-list-item>
					</uni-list>
					<view v-if="needHandSign" class="  margin-top flex align-center margin-bottom-lg" style="width: 95%;">
						<text class="margin-left-lg" style="" >
							签名：
						</text>
						<text v-if="!signImage" class="" :style="{color:changeColor?'red':''}"  style="text-align: left; color: gray;width: 70%;"  @click="signClick">
							{{tips}}
						</text>
						<image v-else  :src="captchaSrc(signImage)"  mode="widthFix" style="width: 60%; height:100%"></image>
						<uni-icons v-if="signImage" @click="clearImage"  :size="20"  style="margin-left: auto;" class="uni-icon-wrapper" color="#bbb" type="clear" />
						<uni-icons v-else :size="20"  style="margin-left: auto;" class="uni-icon-wrapper" color="#bbb" type="arrowright" />
					</view>
				</view>
				<view class="cu-bar bg-white">
					<view class="action margin-0 flex-sub solid-left" @tap="close()">取消</view>
					<view class="action margin-0 flex-sub text-green solid-left" @tap="confirm()">确认</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { buttonShow } from '@/static/js/buttonShow.js';
import { errorToast, successToast,isEnglish,filterNumbers, confirmModal, errorModal,getUrl,ignoreHtml} from '@/static/js/common.js';
import {
		configSelectData
	} from '@/static/js/formUtil.js';
import { mapState } from 'pinia';
import {useLoginUserStore} from '@/stores/login-user.js';
const app = getApp();
export default {
	name: 'OmToolbar',
	props: {
		/* 按钮对象数组，
			{
				text:		按钮名称[String],
				iconCls:	按钮图标样式[String],
				func:		方法名[String]}
			}
		*/
		buttons: {
			type: Array,
			default() {
				return [];
			}
		},
		// 边框
		bordered: {
			type: Boolean,
			default: true
		},
		// 字体大小
		fontSize: {
			type: String,
			default: 'smaller'
		},
		showImage: {
			type: String,
			default: ''
		}
	},
	inject: ['show'],
	data() {
		return {
			fileId: null,
			busCode: '',
			orgId: null,
			toolbar: true,
			showModal: false,
			showCancel: true,
			showChangeApprover: false,//显示更换审批人
			showChangeNode: false,//显示转办
			changeNodeRequired:false,
			cancelFun: '', //取消方法
			confirmFun: '', //确认方法
			modalTitle: '',
			checkRadio: [],
			radioIndex: 0,
			clickBtnIndex:0,//用户点击按钮的索引值
			dialogSubmitUrl:"",
			changeNodeInitData:[],
			//提交到后台的数据
			opinion: '', //审核意见
			isApprove: '1', //用户勾选
			changeApprover: false, //是否勾选“更改审批人”
			changeNode: false, //是否勾选“转办”
			approveUserId: '',
			approveUserName: '',
			backNodeId:'',
			backFlowNodeName: '',
			changeNodeUserIds:'',//转办人员
			changeNodeUserNames:'',
			approveing:false,
			backTypeList:[{
				value:'1',
				name:'接收节点处理后，按顺序流转'
			},{
				value:'2',
				name:'接收节点处理后，直接返给我'
			}],
			backType:'',
			current:0,
			noOpinion:false,
			bottomTips:'请在框中书写，签名仅限于业务信息接收确认',
			storageKey:'signature-key',
			signImage:'',
			needHandSign:false,
			changeColor:false,
			tips:'点击签名'
		};
	},
	created() {
		this.fileId = this.show.formId;
		this.busCode = this.show.busCode;
		this.orgId = this.show.orgId;
	},
	computed: {
		...mapState(useLoginUserStore, ['userName', 'userId'])
	},
	watch:{
		showImage:{
			handler:function(newVal,oldVal){
				this.signImage = newVal
			}
		}
	},
	methods: {
		getAccessToken(){
			let _that = this
			_that.om.getBaiduToken()
		},
		clearImage(){
			let _that = this
			uni.removeStorageSync(_that.storageKey)
			_that.signImage = ''
		},
		captchaSrc(signImage){
			return signImage.replace(/[\r\n]/g, "");
		},
		signClick(){
			let _that = this
			if(isEnglish(_that.userName)){
				uni.navigateTo({
					url: "../../public/signature/signature?goToOld="+true
				})
			}else{
				let signName = filterNumbers(_that.userName)
				uni.navigateTo({
					url: "../../public/signature/signature?bottomTips=" + _that.bottomTips + '&userName=' + signName
				})
			}
		},
		backTypeRadioChange(evt){
			let _that = this
			for (let i = 0; i < _that.backTypeList.length; i++) {
				if (_that.backTypeList[i].value === evt.detail.value) {
					_that.current = i;
					_that.backType = evt.detail.value
					break;
				}
			}
		},
		procecureClick(){
			this.$emit('procecureClick')
		},
		hideModal(e) {
			this.showModal = false;
			this.tips = '点击签名'
			this.changeColor = false
			this.$nextTick(function(){
				this.initParam()
			})
		},
		getSubmitData(){
			return {
				isApprove: this.isApprove,
				formId: this.fileId,
				busCode: this.busCode,
				businessFormCode: this.busCode,
				fileOrgId: this.orgId,
				opinion: this.opinion,
				approveUserId:this.approveUserId,
				backNodeId:this.backNodeId,
				changeNodeUserIds:this.changeNodeUserIds,
				changeNodeRequired:false,
				backType:this.backType,
				sign:this.signImage
			}
		},
		initParam(){
			Object.assign(this, {
				changeNodeInitData:[],
				checkRadio: [],
				radioIndex: 0,
				//提交到后台的数据
				opinion: '', //审核意见
				isApprove: '1', //用户勾选
				changeApprover: false, //更改审批人
				approveUserId: '',
				approveUserName: '',
				backNodeId:'',
				backFlowNodeName: '',
				changeNodeUserIds:'',
				changeNodeUserNames:'',
				current:0,
				noOpinion:false,
			})
		},
		//取消操作
		close() {
			this.hideModal();
		},
		//确认方法
		confirm() {
			if(this.isApprove == '4' && !this.opinion){
				this.noOpinion = true
				return 
			}
			if(this.needHandSign && !this.signImage){
				this.changeColor = true
				this.tips = '请先完成签名'
				return
			}
			this.showModal = false;
			if (this.confirmFun) {
				this[this.confirmFun]();
				uni.removeStorageSync(this.storageKey)
				this.needHandSign = false
			}
		},
		btnChange(index) {
			this.clickBtnIndex = index
			this[this.buttons[index].func](index);
		},
		edit: function(index) {
			let _that = this;
			let button = this.buttons[index];
			let simpleClazzName = ''
			if(this.show.showTailData.length){
				if(this.show.showTailData[0].attr){
					simpleClazzName = this.show.showTailData[0].attr.simpleClazzName
				}
				uni.setStorage({
					key:'bottomFileListCache',
					data:this.show.showTailData
				})
			}
			if (button.edUrl) {
				uni.redirectTo({
					url: button.edUrl + '?edit=true&fileId=' + _that.fileId + '&code=' + _that.busCode + '&simpleClazzName='+simpleClazzName
				});
			} else {
				_that.om.toast('修改功能正在开发中，可在电脑端完成相应功能');
			}
		},
		checkedit: function(index) {
			let _that = this;
			let button = this.buttons[index];
			if (button.ceUrl) {
				uni.navigateTo({
					url: button.ceUrl + '?checkedit=true&fileId=' + _that.fileId + '&code=' + _that.busCode
				});
			} else {
				_that.om.toast('修改功能正在开发中，可在电脑端完成相应功能');
			}
		},
		send: function() {
			let _that = this;
			_that.om.request(
					'wxPosBusiAuth/buttonTip',
					{
						formId: _that.fileId,
						'formCode': _that.busCode,
						str: 'isedit'
					},
					'post'
				).then(res => {
					if (!res.succeed) {
						if (res.msg) {
							errorModal(_that, '错误提示', res.msg);
						} else {
							errorToast('发送失败');
						}
					} else {
						return _that.om.request('common/canEditSend', {
							formId: _that.fileId,
							formCode: _that.busCode,
							fileOrgId: _that.orgId
						});
					}
				}).then(
					res => {
						if (res.succeed) {
							if (res.value) {
								confirmModal(_that, '提示信息', '表单已有驳回记录且未修改，是否继续发送？', 'send1');
							} else {
								return _that.send1();
							}
						} else {
							if (res.msg) {
								errorModal(_that, '错误提示', res.msg);
							} else {
								errorToast('发送失败');
							}
						}
					},
					err => {
						errorToast('网络异常，请稍后再试！');
					}
				).then(
					res => {
						if(res.succeed){
							successToast('发送成功');
							_that.show.loadFlow();
							//按钮权限判断
							buttonShow(_that, _that.busCode, _that.fileId).then(data => {
								_that.show.$set(_that.show, 'buttons', data);
							});
						}else{
							errorToast(res.msg);
						}
					},err => {
						errorToast('网络异常，请稍后再试！');
					}
				);
		},
		send1: function() {
			let _that = this;
			return _that.om.request(
				'wxCommon/send',
				{
					formId: _that.fileId,
					busCode: _that.busCode,
					fileOrgId: _that.orgId
				},
				'post'
			)
		},
		remove: function() {
			let _that = this;
			_that.om
				.request(
					'wxPosBusiAuth/buttonTip',
					{
						formId: _that.fileId,
						'formCode': _that.busCode,
						str: 'isdelete'
					},
					'post'
				)
				.then(res => {
					if (!res.succeed) {
						errorModal(_that, '错误提示', res.msg);
					} else {
						confirmModal(_that, '提示信息', '您确认想要删除该表单吗？', 'remove1');
					}
				});
		},
		remove1: function() {
			let _that = this;
			_that.om
				.request(
					'wxCommon/doRemove',
					{
						formId: _that.fileId,
						busCode: _that.busCode
					},
					'post'
				)
				.then(
					res => {
						if (res.value) {
							uni.setStorage({
								key: this.show.flowChangeCache,
								data: true
							});
							//回上一层
							uni.navigateBack({
								delta: 1
							});
							// successToast('删除成功');
							// //按钮权限判断
							// buttonShow(_that, _that.busCode, _that.fileId).then(data => {
							// 	_that.show.$set(_that.show, 'buttons', data);
							// });
						} else {
							errorToast('删除失败');
						}
					},
					err => {
						errorToast('网络异常，请稍后再试！');
					}
				);
		},
		dissend: function() {
			let _that = this;
			_that.om
				.request(
					'wxPosBusiAuth/buttonTip',
					{
						formId: _that.fileId,
						'formCode': _that.busCode,
						str: 'isedit'
					},
					'post'
				)
				.then(res => {
					if (!res.succeed) {
						if (res.msg) {
							errorModal(_that, '错误提示', res.msg);
						} else {
							errorToast('取回失败');
						}
					} else {
						confirmModal(_that, '提示信息', '您确认想要取回已发送的该表单吗？', 'dissend1');
					}
				});
		},
		dissend1: function() {
			let _that = this;
			_that.om
				.request(
					'wxCommon/retrieve',
					{
						formId: _that.fileId,
						busCode: _that.busCode,
						fileOrgId: _that.orgId
					},
					'post'
				)
				.then(
					res => {
						if (res.succeed) {
							_that.show.loadFlow();
							successToast('取回成功');
							//按钮权限判断
							buttonShow(_that, _that.busCode, _that.fileId).then(data => {
								_that.show.$set(_that.show, 'buttons', data);
							});
						} else {
							errorModal(_that, '错误提示', res.msg);
						}
					},
					err => {
						errorToast('网络异常，请稍后再试！');
					}
				);
		},
		//审核
		examine: function(index) {
			let _that = this;
			let button = this.buttons[index];
			let btnArr = [
				{
					value: '1',
					text: '同意'
				},
				
			];
			
			if (button.parallelFlag) {
				btnArr.push({
					value: '2',
					text: '不同意'
				})
				if (button.abstainFlag) {
					btnArr.push({
						value: '3',
						text: '弃权'
					});
					
				}
			}
			if (button.backAbleFlag) {
				btnArr.push({
					value: '4',
					text: '驳回'
				});
			}
			if(button.needHandSign){
				this.needHandSign = true
				_that.getAccessToken()
			}
			this.showChangeNode = button.changeNodeOn;
			this.changeNodeRequired = button.changeNodeRequired;
			this.checkRadio = btnArr;
			if (button.chUrl) {
				uni.navigateTo({
					url: button.chUrl + '?fileId=' + _that.fileId + '&code=' + _that.busCode+'&btnArr='+ JSON.stringify(btnArr)+
					'&showChangeNode='+button.changeNodeOn+'&changeNodeRequired='+button.changeNodeRequired
					+'&buttons='+JSON.stringify(this.buttons)
				});
			} else {
					this.cancelFun = 'close';
					this.confirmFun = 'examineYes';
					this.modalTitle = '审核提示';
					this.showModal = true;
			}
		},
		getTip:function(index){
			let _that = this
			_that.om.request(
				"common/getCheckBeforeTip",
				{
					formId: _that.fileId,
					businessFormCode: _that.busCode
				}
			).then(res=>{
				if(res.succeed ){
					if(res.value){
						confirmModal(_that,"提示信息",ignoreHtml(res.value),
						()=>{
						},
						()=>{
							this.examine(index)
						},'不需要','需要')
					}else{
						this.examine(index)
					}
				}else{
					_that.om.toast("网络异常，请稍后再试！")
				}
			})
		},	
		examineYes: function() {
			let _that = this;
			let checkeditFlag = false;
			if (_that.buttons.length > 1) {
				for (var i = 0; i < _that.buttons.length; i++) {
					var e = _that.buttons[i];
					if (e.func === 'checkedit') {
						checkeditFlag = true;
					}
				}
			}
			let submitData = _that.getSubmitData()
			if(submitData.isApprove !== "4"){
				if (checkeditFlag) {
					_that.om
						.request(
							'wxCommon/verifyAudit',
							{
								formId: _that.fileId,
								busCode: _that.busCode
							},
							'get'
						)
						.then(
							res => {
								if (res.succeed) {
									if (res.value) {
										errorModal(_that, '错误提示', ignoreHtml(res.msg || res.value));
									} else {
										_that.examYes();
									}
								} else {
									errorModal(_that, '错误提示', ignoreHtml(res.msg));
								}
							},
							err => {
								errorToast('网络异常，请稍后再试！');
							}
						);
				} else {
					_that.examYes();
				}
			}else{
				_that.examYes();
			}
		},
		examYes: function() {
			let _that = this;
			let auditParam = _that.getSubmitData();
			if(this.changeNodeRequired && !auditParam.changeNodeUserIds){
				this.om.toast("转办审核人为必选项");
				return
			}
			_that.om
				.request(
					'wxCommon/audited',
					_that.getSubmitData(),
					'post'
				)
				.then(
					res => {
						if (res.succeed) {
							_that.show.loadFlow();
							//按钮权限判断
							buttonShow(_that, _that.busCode, _that.fileId).then(data => {
								_that.show.$set(_that.show, 'buttons', data);
							});
							successToast('审核成功');
							_that.$emit('getSignList')
							_that.signImage = ''
						} else {
							errorModal(_that, '提示', res.msg);
						}
						this.hideModal();
					},
					err => {
						errorToast('网络异常，请稍后再试！');
						this.hideModal();
					}
				);
		},
		
		//弃核
		disexamine: function() {
			let _that = this;
			confirmModal(_that, '提示信息', '您确认想要弃核吗？', function() {
				_that.om
					.request(
						'wxCommon/giveUp',
						{
							formId: _that.fileId,
							busCode: _that.busCode,
							fileOrgId: _that.orgId
						},
						'post'
					)
					.then(
						res => {
							if (res.succeed) {
								_that.show.loadFlow();
								successToast('弃核成功');
								//按钮权限判断
								buttonShow(_that, _that.busCode, _that.fileId).then(data => {
									_that.show.$set(_that.show, 'buttons', data);
								});
								_that.$emit('getSignList')
							} else {
								errorModal(_that, '错误提示', res.msg);
							}
						},
						err => {
							errorToast('网络异常，请稍后再试！');
						}
					);
			});
		},
		//审批
		approve: function(index) {
			let _that = this;
			if(_that.approveing){
				return
			}
			let button = this.buttons[index];
			let btnArr = [
				{
					value: '1',
					text: '同意'
				}
			];
			//允许作废
			if (button.cancelAble) {
				btnArr.push({
					value: '2',
					text: '不同意'
				});
			}
			//允许驳回
			if (button.backAbleFlag) {
				btnArr.push({
					value: '4',
					text: '驳回'
				});
			}
			//更换审批人
			if (button.changeApprover) {
				this.showChangeApprover = true;
			}
			if(button.needHandSign){
				this.needHandSign = true
				_that.getAccessToken()
			}
			this.checkRadio = btnArr;
			_that.om
				.request(
					'wxPosBusiAuth/buttonTip',
					{
						formId: _that.fileId,
						'formCode': _that.busCode,
						str: 'isapprove'
					},
					'post'
				)
				.then(
					res => {
						if (!res.succeed) {
							errorModal(_that, '错误提示', res.msg);
						} else {
							_that.cancelFun = 'close';
							_that.confirmFun = 'approveYes';
							_that.modalTitle = '审批提示';
							_that.showModal = true;
						}
					},
					err => {
						errorToast('网络异常，请稍后再试！');
					}
				);
		},
		approveYes: function() {
			// let button = this.buttons[this.clickBtnIndex];
			let _that = this;
			if(_that.needHandSign && !_that.signImage){
				this.om.toast("请先完成签名");
				return
			}
			let submitData = _that.getSubmitData();
			let url = ""
			_that.approveing = true
			if(submitData.approveUserId){
				url = "common/doModifyAudited"
			}else{
				url = 'wxCommon/doApproval';
			}
			_that.om
				.request(
					url,
					submitData,
					'post'
				)
				.then(
					res => {
						if (res.succeed) {
							_that.show.loadFlow();
							//按钮权限判断
							buttonShow(_that, _that.busCode, _that.fileId).then(data => {
								_that.show.$set(_that.show, 'buttons', data);
							});
							successToast('审批成功');
							_that.$emit('getSignList')
							_that.approveing = false
							_that.signImage = ''
						} else {
							errorModal(_that, '错误提示', res.msg);
							_that.approveing = false
							// errorModal(res.msg);
						}
					},
					err => {
						errorToast('审批失败');
					}
				);
		},
		//弃批
		disapprove(){
			let _that = this
			confirmModal(_that,'提示信息','您确定想弃批吗?',()=>{
				_that.om.request(
					"common/doApprovalBack",
					{
						businessFormCode: _that.busCode,
						formId: _that.fileId
					},
					'POST'
				).then(res=>{
					if (res.succeed) {
						_that.show.loadFlow();
						//按钮权限判断
						buttonShow(_that, _that.busCode, _that.fileId).then(data => {
							_that.show.$set(_that.show, 'buttons', data);
						});
						successToast('弃批成功');
						_that.$emit('getSignList')
					} else {
						errorModal(_that, '错误提示', res.msg);
						// errorModal(res.msg);
					}
				})
			},()=>{})
		},
		radioChange(e) {
			this.isApprove = e.target.value;
			for (let i = 0; i < this.checkRadio.length; i++) {
				if (this.checkRadio[i].value === e.target.value) {
					this.radioIndex = i;
					break;
				}
			}
			if(this.isApprove !== "1"){
				this.changeApprover = false
				this.approveUserId = ""
				this.approveUserName = ""
			}
			if(this.isApprove !== "4"){
				this.backNodeIndex = 0
			}
		},
		switchApproverChange(e) {
			this.changeApprover = e.detail.value;
		},
		linkApproveUserFunc() {
			var url = getUrl('/pages/public/search/search', {
				other: JSON.stringify({
					isleave: false
				}),
				namefield: 'userSalaryPosInstName',
				searchfield: 'q',
				url: 'temployee/getUserCombobox',
				cachename: this.show.flowChangeApproveCache,
				placeholder: '请输入姓名'
			});
			uni.navigateTo({
				url: url
			});
		},
		switchChangeNodeChange(e) {
			this.changeNode = e.detail.value;
		},
		linkChangeNodeUserFunc() {
			var url = getUrl('/pages/public/multiSearch/multiSearch', {
				other: JSON.stringify({
					flowConfigNodeId: this.buttons[this.clickBtnIndex].flowConfigNodeId
				}),
				maxSelectNum:5,
				pagination:true,
				namefield: 'userPosInstName',
				searchfield: 'q',
				initdata:[],
				url: 'flowConfigNode/getChangeNodePager',
				cachename: this.show.flowChangeNodeCache,
				placeholder: '请输入姓名、岗位、机构'
			});
			uni.setStorage({
				key: this.show.flowChangeNodeCache,
				data: this.changeNodeInitData
			})
			uni.navigateTo({
				url: url
			});
		},
		linkBackFlowNodeFunc() {
			if(this.isApprove === "4"){
				let url = getUrl('/pages/public/search/search', {
					other: JSON.stringify({
						businessFormCode: this.busCode,
						formId: this.fileId
					}),
					namefield: 'role|sort',
					namesplit: '|',
					extrafield: 'userNames',
					url: 'common/getBackFlowList',
					cachename: this.show.backFlowNodeCache,
					placeholder: '请选择',
					initload:true,
					searchbar:false
				});
				uni.navigateTo({
					url: url
				});
			}
		}
	}
};
</script>
<style scoped>
	.setting{
		border-radius: 5px ;
		padding: 5px; 
		background-color: #b6f7c3;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}
	.noOptionClass{
		border:1px solid red
	}
</style>
